<?php
  
  function db_connect(){
    	
    $result = new mysqli('localhost', 'bbox', 'bbox', 'bbox');
    
    if(!$result) throw new Exception('Could not connect to database server.');
    else{
      
      $result->query("SET NAMES utf8");
      return $result;
    	
    }
    
  }  //end function db_connect
?>